
package advice.throwses;

import common.HelloException;
import common.HelloInterface;

/**
 * @author Eric.Kao(gau168.gau@msa.hinet.net)
 * @version 1.0
 * @company E885 Group
 * @copyright Copyright (c) 2001-2008
 */

public class HelloSpeakerThrows implements HelloInterface
{
	/*
	 * (non-Javadoc)
	 * 
	 * @see common.HelloInterface#sayHello(java.lang.String)
	 */
	public void sayHello( String name ) throws HelloException
	{
		System.out.println( "say hello:" + name );

		// 故意丟出 exception, 讓 ExceptionAdvice 攔截
		throw new HelloException( "hello exception" );
	}

	public void sayHi( String name ) throws HelloException
	{
		// 目前用不到
		throw new IllegalStateException( "Not implementation" );
	}
}
